<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
    <title>测评用户管理</title>
<link href="../styles/xuanz.css" rel="stylesheet" type="text/css" />
<script src="../styles/script.js" type="text/javascript"></script>
</head>

<body>
<div id="neinei">
<div id="kuangkuang_admin">
<%@ include file="/common/left-admin.jsp"%>
<div class="kuangright">
<h1>测评用户管理</h1>
<div style="color:red;clear:both">
<s:fielderror />
</div>
<s:form action="userManager" method="post" namespace="/admin" theme="simple">
所属院校：
  <s:if test='roleName == "ROLE_ADMIN"'>
    <s:select
            label="所属高校"
            list="schoolList"
            name="schoolId"
            listKey="id"
            listValue="name"
            headerKey="-1"
            headerValue="--- 全部高校  ---"
            cssStyle="width:155px"
            />
  </s:if>
  <s:else>
    <s:select
            label="所属高校"
            list="schoolList"
            name="schoolId"
            listKey="id"
            listValue="name"
            cssStyle="width:155px"
            />
  </s:else>
姓名：
    <s:textfield
            label="姓名"
            name="name"
            cssStyle="width:70px"
            />
    <s:submit value="查询"/><s:if test='roleName == "ROLE_ADMIN"'>&nbsp;<input type="button" name="export" value="导出数据" onclick="javascript:exportData();"/>&nbsp;<input type="button" name="generate" value="生成模型" onclick="javascript:generateData();"/></s:if>
    <table width="580" border="0" cellspacing="1" cellpadding="5">
      <tr align="center">
        <td width="7%" align="center" bgcolor="#f2f2f2">序号</td>
        <td width="15%" align="center" bgcolor="#f2f2f2">姓名</td>
        <td width="18%" align="center" bgcolor="#f2f2f2">学号</td>
        <td width="24%" align="center" bgcolor="#f2f2f2">邮箱</td>
        <td width="24%" align="center" bgcolor="#f2f2f2">所属高校</td>
        <td width="12%" align="center" bgcolor="#f2f2f2">测评报告</td>
      </tr>
      <s:if test="users.size > 0">
        <s:iterator value="users" status="stat">
        <tr align="center">
          <td bgcolor="#FFFFFF">&nbsp;<s:property value="#stat.index + 1" /></td>
          <td bgcolor="#FFFFFF" align="left">&nbsp;<s:property value="name" /></td>
          <td bgcolor="#FFFFFF" align="left">&nbsp;<s:property value="studentId" /></td>
          <td bgcolor="#FFFFFF" align="left">&nbsp;<s:property value="email" /></td>
          <td bgcolor="#FFFFFF" align="left">&nbsp;<s:property value="school.overSchool.name" /></td>
          <s:url id="disReportUrl" action="disReport" namespace="/">
              <s:param name="id" value="id" />
          </s:url>
          <s:if test="testFinish">
            <td bgcolor="#FFFFFF"><s:a href="%{disReportUrl}">查看</s:a></td>
          </s:if>
          <s:else>
           <td bgcolor="#FFFFFF">未完成</td>
          </s:else>
        </tr>
        </s:iterator>
      </s:if>
    </table>
    <br />    
</s:form>
<br />
<br />
</div>
</div>
</div>

</body>
</html>
